package br.usp.icmc.client.controladores;

import br.usp.icmc.client.dao.AdminDAO;
import br.usp.icmc.client.entidades.Admin;
import br.usp.icmc.client.exception.RegisterException;
 


/********************************************************************************
 * <b> <br> Projeto: Aplicativo Cliente <br><b>
 * 
 * Classe de controle do Admin
 * 
 * @author felipe
 * 
 *******************************************************************************/
public class ControllerAdmin {
	
	
	
	Admin adm;
	AdminDAO admDAO;
	
	
	/***************************************************************************
	 * Construtor padrão da entidade ControllerAdmin
	 **************************************************************************/
	public ControllerAdmin() {
		adm = new Admin();
		admDAO = new AdminDAO();
	}
	
	/**
	 * 
	 * Adiciona o administrador ao sistema
	 * 
	 * @param email
	 * 				Email de cadastro do administrador
	 * @param password
	 * 				Senha do administrador
	 * @param fullName
	 * 				Nome completo do administrador
	 */
	public void addAdmin(String email, String userName, String password, String fullName){
		
		adm.setEmail(email);
		adm.setPassword(password);
		adm.setFullName(fullName);
		adm.setUserName(userName);
		
		admDAO.save(adm);
	}
	

}
